package com.filmbooks.contract.detail;

import com.filmbooks.model.home.bean.movie.MovieDetailBean;
import com.filmbooks.model.home.bean.movie.PersonBean;
import com.filmbooks.model.home.bean.movie.SubjectsBean;
import com.zyw.horrarndoo.sdk.base.BasePresenter;
import com.zyw.horrarndoo.sdk.base.IBaseModel;
import com.zyw.horrarndoo.sdk.base.IBaseView;

import io.reactivex.Observable;

/**
 * Created by heshuxiang on 2018/3/9.
 * 描述：
 * 公司：盟将威
 * 作者：heshuxiang
 * 日期：2018/3/9.
 * 工程：FilmBooks
 * 包：com.filmbooks.contract.detail
 */

public interface MovieDeatilContract {
    abstract class MovieDetailPresenter extends BasePresenter<IMovieDetailModel, IMovieDetailView> {
        /**
         * 加载电影详情
         *
         * @param id 电影id
         */
        public abstract void loadMovieDetail(String id);

        /**
         * item点击事件
         *
         * @param position position
         * @param item     item
         */
        public abstract void onItemClick(int position, PersonBean item);

        /**
         * header点击事件
         *
         * @param bean bean
         */
        public abstract void onHeaderClick(SubjectsBean bean);
    }

    interface IMovieDetailModel extends IBaseModel {
        /**
         * 获取电影详情
         *
         * @param id 电影id
         * @return 电影详情
         */
        Observable<MovieDetailBean> getMovieDetail(String id);
    }

    interface IMovieDetailView extends IBaseView {
        /**
         * 显示电影详情
         *
         * @param bean 电影详情bean
         */
        void showMovieDetail(MovieDetailBean bean);

        /**
         * 显示网络错误
         */
        void showNetworkError();
    }
}
